import { createApp } from 'vue'
import App from './App.vue'
import { setupI18n } from '@/plugins/vueI18n'
import { setupStore } from '@/store'
import { setupElementPlus } from '@/plugins/elementPlus'
import 'element-plus/dist/index.css'
//svg插件需要的配置代码
import 'virtual:svg-icons-register'
//引入自定义插件对象：注册整个项目全局组件
import globalComponent from '@/components'
//引入模板的全局样式
import '@/styles/index.scss'
//引入全局事件总线
//import emitter from '@/utils/emitter'
//引入路由
import router from './router'
//引入路由鉴权文件
import './authentication'

//获取应用实例对象
const app = createApp(App)

await setupI18n(app)

setupStore(app)

setupElementPlus(app)

//安装自定义插件
app.use(globalComponent)
//注册模板路由
app.use(router)
//将应用挂载到挂载点上
app.mount('#app')
